{% extends "base-html5.html" %}

{% block title %}webtrees - main menu{% endblock %}

{% block body %}
  <p>
    <b>{{ greeting }}</b> - Webtrees for the web is a website that stores your 
    search terms in a tree, and allows you to surf this tree of terms using a
    search engine of your choice (like google or wikipedia). To simply try it
    out and play with it, select one of the public webtrees made by others, or
    create a new one.
  </p>

  <!-- IF HAVE_OWN_TREES -->
  <h2>My webtrees: [<a href="/tree_create_new_one">create a new one</a>]</h2>
  <ul>
    {% for t in mytrees %}
    <li>{{t.name}} - 
      <div>
	[<a href="/webtree?name={{t.name}}">view</a>]
	[<a href="/edit_raw?name={{t.name}}">edit raw</a>]
	[<a href="/delete?name={{t.name}}">delete</a>]
      </div>
    </li>
    {% endfor %}
  </ul>
  <!-- ENDIF HAVE_OWN_TREES -->

  <!-- IF EXIST_PUBLIC_TREES -->
  <h2>Public webtrees:</h2>
  <ul>
    {% for tpub in pubtrees %}
    <li>{{ tpub.name }} - by {{ tpub.owner }}
      <div>
	[<a href="/webtree?name={{tpub.name}}">view</a>]
	[<a href="/fork?name={{tpub.name}}">fork</a>]
      </div>
    </li>
    {% endfor %}
  </ul>
  <!-- ENDIF EXIST_PUBLIC_TREES -->

  <!-- IF EXIST_PUBLIC_TREES -->
  <h2>Anonymous webtrees:</h2>
  <ul>
    {% for tanon in anontrees %}
    <li>{{ tanon.name }}
      <div>
	[<a href="/webtree?name={{tanon.name}}">view</a>]
	[<a href="/fork?name={{tanon.name}}">fork</a>]
      </div>
    </li>
    {% endfor %}
  </ul>
  <!-- ENDIF EXIST_PUBLIC_TREES -->

{% endblock %}
